import React, { useState } from 'react';
import { Modal } from 'antd';
import ReactJson from 'react-json-view';

// https://mac-s-g.github.io/react-json-view/demo/dist/
// https://blog.csdn.net/qq_35536883/article/details/98883235

const ExportSchemaModal = (props: any) => {
  const { visible, schema, onClose } = props;

  const handleOk = () => {
    onClose();
  };

  const handleCancel = () => {
    onClose();
  };

  return (
    <Modal
      title="导出 schema"
      visible={visible}
      onOk={handleOk}
      onCancel={handleCancel}
      width={1000}
    >
      <ReactJson src={schema} theme="bright" iconStyle={'circle'} />
    </Modal>
  );
};
export default ExportSchemaModal;
